home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / qbbs / qmain_20.zip / STRUCT.203 < prev    next >
Text File  |  1988-08-04  |  17KB  |  435 lines

  1. Structure Code for QuickBBS Version 2.03
  2. ========================================
  3.  
  4. --QuickBBS is a trademark of Adam Hudson.
  5.  
  6. ********************************************************************************
  7. *                               "Disclaimer"                                   *
  8. *                                                                              *
  9. *  This file contains the data file structures used by QuickBBS. This info. is *
  10. * taken from STRUCT.201 provided with Q-Main 2.01 and includes some other info *
  11. * which was not listed that I thought some of you Utility Writters might find  *
  12. * of use. There are NO GUARANTEE as to the info. listed below being correct,   *
  13. * mainly because this is not the official structure file put out by the author *
  14. * of QuickBBS (Adam Hudson).                                                   *
  15. ********************************************************************************
  16.  
  17.  
  18. **NOTE** String Variable are 1 Byte larger than it's size. So a variable of
  19.          String[10] would take up 11 Bytes.
  20.  
  21.    Turbo Pascal Variable Type    Length   Range
  22.    ====================================================================
  23.    Byte                        | 1 byte  | 0..255                     |
  24.    Char                        | 1 byte  | 1 Character                |
  25.    Boolean                     | 1 byte  | FALSE (0) or TRUE (1)      |
  26.    Integer                     | 2 bytes | -32768..32767              |
  27.    Word                        | 2 bytes | 0..65535                   |
  28.    LongInt                     | 4 bytes | -2147483648..2147483647    |
  29.    Real                        | 6 bytes | 10(-38) power..10(38) power|
  30.    ====================================================================
  31.  
  32.  
  33.  
  34. ==========================================================================
  35. *********************
  36. *Filename: USERS.BBS*
  37. *********************
  38.  
  39. Type
  40.   FlagType = Array[1..4] of Byte;
  41.  
  42.   UserRecord = Record
  43.                  Name:               String[35];
  44.                  City:               String[25];
  45.                  Pwd:                String[15];
  46.                  DataPhone,
  47.                  HomePhone:          String[12];
  48.                  LastTime:           String[5];
  49.                  LastDate:           String[8];
  50.                  Attrib:             Byte;
  51.                  Flags:              FlagType;
  52.                  Credit,
  53.                  Pending,
  54.                  TimesPosted,
  55.                  HighMsgRead,
  56.                  SecLvl,
  57.                  Times,
  58.                  Ups,
  59.                  Downs,
  60.                  UpK,
  61.                  DownK,
  62.                  TodayK,
  63.                  Elapsed,
  64.                  Len:                Integer;
  65.                  ExtraSpace:         Array[1..8] of Byte;
  66.                End;
  67.  
  68. (*  Attrib: (Attrib: Byte)
  69.  
  70.       Bit 0: Deleted
  71.       Bit 1: Screen Clear Codes
  72.       Bit 2: More Prompt
  73.       Bit 3: ANSI
  74.       Bit 4: No-Kill
  75.       Bit 5: Ignore Download Hours
  76.       Bit 6: ANSI Full Screen Editor
  77.       Bit 7: [ Reserved ]
  78. *)
  79. ==========================================================================
  80.  
  81.  
  82. ==========================================================================
  83. ***********************
  84. *Filename: QNL_IDX.BBS*
  85. ***********************
  86.  
  87.    NodeIdxRecord = Record
  88.                      Zone,
  89.                      Net,
  90.                      Node:      Integer;
  91.                      NodeType:  Byte;
  92.                    End;
  93. ==========================================================================
  94.  
  95.  
  96. ==========================================================================
  97. ***********************
  98. *Filename: QNL_DAT.BBS*
  99. ***********************
  100.  
  101.    NodelistRecord = Record
  102.                       NodeType:  Byte;
  103.                       Zone,
  104.                       Net,
  105.                       Node:      Integer;
  106.                       Name:      String[20];
  107.                       City:      String[40];
  108.                       Phone:     String[40];
  109.                       Password:  String[8];
  110.                       Flags:     Integer;
  111.                       BaudRate:  Integer;
  112.                       Cost:      Integer;
  113.                     End;
  114.  
  115. (*  NodeType variable codes: (Nodetype: Byte)
  116.  
  117.       0 = Normal Node
  118.       1 = Zone Coordinator
  119.       2 = Region Coordinator
  120.       3 = Net Coordinator
  121.       4 = Hub Coordinator
  122.  
  123. *)
  124. ==========================================================================
  125.  
  126.  
  127.  
  128. ==========================================================================
  129. ***********************
  130. *Filename: MSGINFO.BBS*
  131. ***********************
  132.  
  133.       InfoRecord = Record
  134.                      LowMsg:      Integer;     { Lowest Message in File }
  135.                      HighMsg:     Integer;     { Highest Message in File }
  136.                      TotalActive: Integer;     { Total Active Messages }
  137.                      ActiveMsgs:  Array[1..200] of Integer;
  138.                    End;
  139. ==========================================================================
  140.  
  141.  
  142.  
  143. ==========================================================================
  144. **********************
  145. *Filename: MSGIDX.BBS*
  146. **********************
  147.  
  148.       IdxRecord = Record
  149.                     MsgNum:       Integer;
  150.                     Board:        Byte;
  151.                   End;
  152. ==========================================================================
  153.  
  154.  
  155.  
  156. ==========================================================================
  157. **********************
  158. *Filename: MSGHDR.BBS*
  159. **********************
  160.  
  161.           HdrRecord = Record
  162.                         MsgNum,
  163.                         ReplyTo,
  164.                         SeeAlsoNum,
  165.                         TRead:              Integer;
  166.                         StartRec:           Word;
  167.                         NumRecs,
  168.                         DestNet,
  169.                         DestNode,
  170.                         OrigNet,
  171.                         OrigNode:           Integer;
  172.                         DestZone,
  173.                         OrigZone:           Byte;
  174.                         Cost:               Integer;
  175.                         MsgAttr,
  176.                         NetAttr,
  177.                         Board:              Byte;
  178.                         PostTime:           String[5];
  179.                         PostDate:           String[8];
  180.                         WhoTo,
  181.                         WhoFrom:            String[35];
  182.                         Subj:               String[72];
  183.                       End;
  184.  
  185. (* Msg Attributes: (MsgAttr: Byte)
  186.  
  187.       Bit 0: Deleted
  188.       Bit 1: Unmoved Outgoing Net Message
  189.       Bit 2: Is a Net Mail Message
  190.       Bit 3: Private
  191.       Bit 4: Received
  192.       Bit 5: Unmoved Outgoing Echo Message
  193.       Bit 6: Local Bit
  194.       Bit 7: [ Reserved ]
  195.  
  196. **NOTE** I at first thought that when Bit 0 is set to 1 (True) that the msg.
  197.          would be flagged as deleted. I notice that even though I had my
  198.          utility set it to 1 I was still able to read the message.
  199.          The MsgNum (Integer Variable) in the corresponding record in
  200.          MSGIDX.BBS must also be set to something invalid (such as -1).
  201.  
  202.    Net Attributes: (NetAttr: Byte)
  203.  
  204.       Bit 0: Kill Message after it's been sent
  205.       Bit 1: Sent OK
  206.       Bit 2: File(s) Attached
  207.       Bit 3: Crash Priority
  208.       Bit 4: Request Receipt
  209.       Bit 5: Audit Request
  210.       Bit 6: Is a Return Receipt
  211.       Bit 7: [ Reserved ]
  212. ==========================================================================
  213.  
  214.  
  215.  
  216. ==========================================================================
  217. ***************************************
  218. *Filename: MSGTOIDX.BBS and MSGTXT.BBS*
  219. ***************************************
  220.  
  221.   Each record in the MSGTOIDX.BBS file is of type String[35], each entry
  222.   is simply the name of the corresponding message in MSGHDR.BBS is
  223.   addressed to.
  224.  
  225.   Each record in the MSGTXT.BBS file is of type String[255], each entry
  226.   is used to store blocks of message text.  The variable "StartRec" in
  227.   the MSGHDR.BBS file contains the starting record position for the
  228.   text, the variable "NumRecs" indicates how many consecutive blocks
  229.   of text there are in the MSGTXT.BBS file.
  230. ==========================================================================
  231.  
  232.  
  233.  
  234. ==========================================================================
  235. *************************************************
  236. *Filename: SYSINFO.BBS, TIMELOG.BBS, *.MNU files*
  237. *************************************************
  238.  
  239.   SysInfoRecord = Record  { Used in the SYSINFO.BBS file }
  240.                     CallCount:    LongInt;
  241.                     LastCaller:   String[35];
  242.                     ExtraSpace:   Array[1..128] of Byte;
  243.                   End;
  244.  
  245.   TimeLogRecord = Record  { Used in the TIMELOG.BBS file }
  246.                     StartDate:        String[8];
  247.                     BusyPerHour:      Array[0..23] of Integer;
  248.                     BusyPerDay:       Array[0..6] of Integer;
  249.                   End;
  250.  
  251.      MenuRecord = Record  { Used for all *.MNU files }
  252.                     Typ:      Byte;
  253.                     Sec:      Integer;
  254.                     Flags:    FlagType;
  255.                     Str:      String[75];
  256.                     Key:      Char;
  257.                     Data:     String[80];
  258.                     Fg,
  259.                     Bg:       Byte;
  260.                   End;
  261. ==========================================================================
  262.  
  263.  
  264.  
  265. ==========================================================================
  266. ************************
  267. *Filename: LASTREAD.BBS*
  268. ************************
  269.  
  270.       Lastread = Array[1..200] of Integer;
  271.  
  272.  LASTREAD.BBS is a file of Lastread. This stores the last message read for
  273. each user for each individual message area.
  274. ==========================================================================
  275.  
  276.  
  277.  
  278. ==========================================================================
  279. **********************
  280. *Filename: CONFIG.BBS*
  281. **********************
  282.  
  283.       EventRecord = Record  { Part of Configuration Record }
  284.                       Status:       Byte; { 0=Deleted 1=Enabled 2=Disabled }
  285.                       RunTime:      String[5];
  286.                       ErrorLevel:   Byte;
  287.                       Days:         Byte;
  288.                       Forced:       Boolean;
  289.                       LastTimeRun:  String[8];
  290.                     End;
  291.  
  292.       BoardRecord = Record  { Part of Configuration Record }
  293.                       Name:         String[16];
  294.                       Typ:          Byte; { 0=Standard 1=Net 2=EMail 3=Echo }
  295.                       Kinds:        Byte; { 0=Both 1=Pvt 2=Pub 3=Read-Only }
  296.                       Combined:     Boolean;
  297.                       Aliases:      Boolean;
  298.  
  299.                       ReadSecLvl:   Integer;
  300.                       ReadFlags:    FlagType;
  301.  
  302.                       WriteSecLvl:  Integer;
  303.                       WriteFlags:   FlagType;
  304.  
  305.                       SysopSecLvl:  Integer;
  306.                       SysopFlags:   FlagType;
  307.                     End;
  308.  
  309.      ConfigRecord = Record  { Used for the CONFIG.BBS file }
  310.                       (*  Modem Parameters  *)
  311.                       CommPort:      Integer;
  312.                       InitBaud,
  313.                       InitTimes,
  314.                       AnswerWait:    Integer;
  315.                       ModemInitStr,
  316.                       ModemBusyStr:  String[70];
  317.                       ModemInitResp,
  318.                       ModemBusyResp,
  319.                       Resp300,
  320.                       Resp1200,
  321.                       Resp2400:      String[40];
  322.  
  323.                       (*  System Paths  *)
  324.                       MenuPath,
  325.                       TextPath,
  326.                       NetPath:      String[66];
  327.  
  328.                       (*  Restriction Parameters  *)
  329.                       MinBaud,
  330.                       GraphicsBaud,
  331.                       XferBaud:      Integer;
  332.                       LowBaudStart,
  333.                       LowBaudEnd,
  334.                       DownloadStart,
  335.                       DownloadEnd,
  336.                       PagingStart,
  337.                       PagingEnd:     String[5];
  338.  
  339.                       (*  Matrix Information  *)
  340.                       MatrixZone,
  341.                       MatrixNet,
  342.                       MatrixNode:    Integer;
  343.                       AkaNet,
  344.                       AkaNode:       Array[1..5] of Integer;
  345.                       NetMailBoard:  Integer;
  346.  
  347.                       (*  Default Information for New Users  *)
  348.                       DefaultSec:                Integer;
  349.                       DefaultCredit:             Integer;
  350.                       DefaultFlags:              FlagType;
  351.  
  352.                       (*  Sysop Security Levels  *)
  353.                       EditorCmdStr:    String[70];
  354.                       OriginLine:      String[60];
  355.                       SysopName:       String[35];
  356.                       AutoLogonChar,
  357.                       FastLogon,
  358.                       ScreenBlanking,
  359.                       UseLastRead,
  360.                       MonoMode,
  361.                       DirectWrite,
  362.                       SnowCheck,
  363.                       NetEchoExit,
  364.                       OneWordNames,
  365.                       CheckMail,
  366.                       AskHomePhone,
  367.                       AskDataPhone,
  368.                       GraphicsAvail:   Boolean;
  369.                       InactiveTimeOut: Integer;
  370.                       LogonTime:       Integer;
  371.                       DefFgColor:      Integer;
  372.                       DefBgColor:      Integer;
  373.                       PasswordTries:   Integer;
  374.                       MaxPageTimes:    Integer;
  375.                       PageBellLen:     Integer;
  376.  
  377.                       UseZoneGates:    Boolean;
  378.                       ExtraSpace:      Array[1..511] of Byte;
  379.  
  380.                       EventRec:        Array[1..30] of EventRecord;
  381.                       BoardRec:        Array[1..200] of BoardRecord;
  382.                     End;
  383.  
  384.    The New Options added to QuickBBS 2.02 is stored in UserZone Gates and
  385.  Extraspace. Below is what I determined:
  386.  
  387.   Option                             Stored
  388.   ======================================================================
  389.   User Xmodem Protocal             | Bollean Variable UserZoneGates
  390.   Use Ymodem (Xmodem-1k) Protocal  | First Byte of EXTRASPACE
  391.   Use Sealink Protocal             | Second Byte of EXTRASPACE
  392.   Use Zmodem Protocal              | Third Byte of EXTRASPACE
  393. * Allow "Batch" Downloads          | Fourth Byte of EXTRASPACE
  394. * Force (xxx)xxx-xxxx Phone Entry  | Fith Bye of EXTRASPACE
  395. * Require Password on Entries      | Sixth Byte of EXTRASPACE
  396.   Message Quotting String          | Byte 8-10 of EXTRASPACE
  397.                                    | (Byte 7 stores the size)
  398. * Upload time Credit Factory       | Byte 11-12 of EXTRASPACE
  399.   Type 7 and 15 Loading Message    | Byte 14-83 of EXTRASPACE
  400.                                    | (Byte 13 stores the size)
  401.   Type 6 command prompt            | Byte 85-154 of EXTRASPACE
  402.                                    | (Byte 14 stores the size)
  403.   ======================================================================
  404. * = Feature not yet implemented
  405.  
  406.  ***NOTE*** To store any character, store the Ordinal Value of it.
  407. ==========================================================================
  408.  
  409.  
  410.  
  411. ==========================================================================
  412. ************************
  413. *Filename: EXITINFO.BBS*
  414. ************************
  415.  
  416.   ExitRecord = Record
  417.                  BaudRate:        Integer;
  418.                  SysInfo:         SysInfoRecord;
  419.                  TimeLogInfo:     TimeLogRecord;
  420.                  UserInfo:        UserRecord;
  421.                  EventInfo:       EventRecord;
  422.                  NetMailEntered:  Boolean;
  423.                  EchoMailEntered: Boolean;
  424.                  LoginTime:       String[5];
  425.                  LoginDate:       String[8];
  426.                  TmLimit:         Integer;
  427.                  LoginSec:        LongInt;
  428.                  Credit:          LongInt;
  429.                  UserRecNum:      Integer;
  430.                  ReadThru:        Integer;
  431.                  PageTimes:       Integer;
  432.                  DownLimit:       Integer;
  433.                End;
  434. ==========================================================================
  435.